package com.jzo2o.customer.controller.worker;

import com.jzo2o.customer.model.dto.request.WorkerCertificationAuditAddReqDTO;
import com.jzo2o.customer.service.IWorkerCertificationAuditService;
import com.jzo2o.customer.service.IWorkerCertificationService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

/**
 * <p>
 * 服务端认证申请审核表 前端控制器
 * </p>
 *
 * @author jianghaijun
 * @since 2025-10-23
 */
@Api(tags = "服务端 - 服务认证相关接口")
@RestController("workerWorkerCertificationAudit")
@RequestMapping("/worker/worker-certification-audit")
public class WorkerCertificationAuditController {
    @Resource
    private IWorkerCertificationAuditService workerCertificationAuditService;

    @ApiOperation("提交认证")
    @PostMapping
    public void workerCertificationAudit(@RequestBody WorkerCertificationAuditAddReqDTO workerCertificationAuditAddReqDTO) {
        workerCertificationAuditService.submit(workerCertificationAuditAddReqDTO);
    }

    @ApiOperation("查询最新的驳回原因")
    @GetMapping("/rejectReason")
    public String rejectReason() {
        return workerCertificationAuditService.rejectReason();
    }
}
